<?php
/**
 * Created by PhpStorm.
 * User: Hanson
 * Date: 2016/9/9
 * Time: 22:26
 */

namespace App;


class Dictionary
{

    const BIRTHDAY = '2016-09-01 00:00:00';

    public static function activityNight()
    {
        return [
            'subscribe' => 12,//报名开始时间
            'abort' => 5,//报名结束时间
            'begin' => 10,//活动开始时间
            'end' => 12,//活动结束时间
            'limit' => [
                0 => 50,//限量已绑定女生
                1 => 50,//限量已绑定男生
                'unbind' => 100,//限量未绑定总人数
            ]
        ];
    }


    /**
     * 交通查询
     *
     * @param $key
     * @return array
     */
    public static function transit($key)
    {
        $array = [
            '花7' => [
                'id' => 10650,
                'fare' => '全程2元',
                'time' => '平均30分钟1班',
                'back' => '06:30-21:30',
                'out' => '06:30-21:30',
                'direction' => 0
            ],
            '花10' => [
                'id' => 13952,
                'fare' => '全程2元',
                'time' => '平均30分钟1班',
                'back' => '06:30-21:30',
                'out' => '06:30-21:30',
                'direction' => 0
            ],
            '花30' => [
                'id' => 13810,
                'fare' => '全程2元',
                'time' => '平均1小时1班',
                'back' => '07:00-19:00',
                'out' => '07:00-19:00',
                'direction' => 1
            ],
            '712' => [
                'id' => 8150,
                'fare' => '分段收费，全程5元',
                'time' => '平均1小时1班，节假日1小时两班，逢整点、半点出发',
                'back' => '09:00-20:00',
                'out' => '07:00-18:00',
                'direction' => 0
            ],
            '712a' => [
                'id' => 14051,
                'fare' => '全程3元',
                'time' => '平均30分钟1班',
                'back' => '07:00-21:00',
                'out' => '06:30-20:00',
                'direction' => 0
            ]
        ];

        return $array[$key];
    }

    /**
     * 模板字典
     *
     * @param $templateId
     * @return array
     */
    public static function template($templateId = null)
    {
        $templates = config('wechat.template');

        $result = [
            $templates['lost_publish'] => '招领发布',
            $templates['lost_audit'] => '招领审核',
            $templates['exception'] => '系统异常',
            $templates['library_expire'] => '图书过期提醒',
            $templates['receive_order'] => '维护接单',
            $templates['lost_result'] => '招领审核通知',
        ];

        return $templateId ? $result[$templateId] : $result;
    }

}